package cn.edu.scau.cmi.zhangxiyang.Singleton;

import java.util.HashSet;
import java.util.Set;

public class marshal {
	private String name;
	private static Set<marshal> marshalset=new HashSet<marshal>();
	
	private marshal(String name) {
		this.name = name;
	}
	
	public static Set<marshal> givebirth(String name){
		if(marshalset.size() < 10) {
			marshal mar = new marshal(name);
			marshalset.add(mar);
		}
		return marshalset;
	}
	
	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}
}
